package com.fuhan.controller;

import com.fuhan.common.restful.ResponseEnum;
import com.fuhan.common.restful.ResponseJSON;
import com.fuhan.pojo.TempHumData;
import com.fuhan.service.TempHumDataService;
import com.fuhan.utils.token.Token;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: Chao
 * @description:
 * @Date: 2021/3/12 17:01
 */
@RestController
@RequestMapping("/api/data")
public class TempHumDataController {
    @Autowired
    private TempHumDataService tempHumDataService;

   // @Token
    @RequestMapping(value = "",method = RequestMethod.GET)
    public ResponseJSON<List<TempHumData>> getData(){
        return new  ResponseJSON<>(tempHumDataService.getTempHumData(), ResponseEnum.SUCCESS_OPTION);
    }
}
